A* Search Algorithm

What is A* Search?

A* Search is a pathfinding algorithm that uses path cost and heuristics to estimate the best path to a goal. It is widely used in applications where the shortest path is required.

Algorithm Steps:

Where:

f(n) = g(n) + h(n)

g(n): Cost from start node to node n.

h(n): Heuristic estimate from node n to goal node.

Path:

Total Path Cost:

Heuristic Values

NodeHeuristic Value

Advantages of A* Search:

Disadvantages of A* Search: